<template>
	<div>
		<aplid-base-crud ref="crud" class="w-100" v-bind="baseConfig" :saveFormate="saveFormate" :beforeOnLoadFormate="beforeOnLoadFormate"> </aplid-base-crud>
	</div>
</template>

<script setup lang="ts">
import { baseConfig } from './config'

let props = withDefaults(
	defineProps<{
		nowRowData: any
		showBtn?:boolean
	}>(),
	{showBtn:true}
)

const saveFormate = (form) => {
	return new Promise((resolve, reject) => {
		resolve({
			...form,
			idCard: props.nowRowData.idCard,
		})
	})
}
const beforeOnLoadFormate = (form) => {
	return new Promise((resolve, reject) => {
		resolve({
			...form,
			idCard: props.nowRowData.idCard,
		})
	})
}
</script>

<style lang="scss" scoped></style>
